<!DOCTYPE html>
<html>

	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<meta id="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport">
		<meta name="apple-themes-web-app-capable" content="yes">
		<meta content="yes" name="apple-mobile-web-app-capable">
		<meta content="black" name="apple-mobile-web-app-status-bar-style">
		<meta content="telephone=no" name="format-detection">
		<meta content="email=no" name="format-detection">
		<meta name="format-detection" content="telephone=no">
		<title>兑换奖品</title>	
		<link rel="stylesheet" href="${s.base}/mobile/css/main.css" type="text/css" media="all">
	</head>

	<body>   
		<header id="header">
			<div class="header_con">
				<a href="javascript:history.go(-1);"><span></span></a> 
                <div class="top_tit">兑换奖品</div>         
			</div>
		</header>
<style type="text/css">
			.font1{color:#F00;}
			
			.xy_list{width:100%; background-color:#FFF;}
			.xy_list .content{width:100%;}
			.xy_list .content li{width:100%; padding:0px; height:0.66rem;}
			.xy_list .content li .c_left{width:20%; float:left;line-height: 0.66rem;color: #333;font-size: 0.22rem; text-align:center; }
			.xy_list .content li .c_left_1{width:30%; float:left;line-height: 0.66rem;color: #333;font-size: 0.22rem; text-align:center; }
			.xy_list .content li .c_center{width:30%; float:left;line-height: 0.66rem;color: #333;font-size: 0.2rem; text-align:center;}
			.xy_list .content li .c_right{width:20%; float:left;line-height: 0.66rem;color: #333;font-size: 0.22rem; text-align:center; }
			
        </style>
		<div id="content_div" >
            <div class="wq_list">
				<ul>
					<li style="border:0px;">
						<i style="background: url(${item.imageOne}) no-repeat;background-size: 0.56rem 0.56rem;"></i>
						<p style="padding:0px; font-size: 0.28rem;color: #333;line-height: 0.38rem; margin-bottom:0.1rem;">${item.title}</p>
						<p style="padding-left: 1rem;"><span style="width: 2rem;">中奖号码：</span>  <em>${winningNum}</em></p>
					</li>
				</ul>
            </div>
             <div class="pay_02">
              <p class="border_bottom">领奖类型 <span>
				  <#if receiving.type?if_exists&&receiving.type=='1'>
					  <input type="text" name="name" value="直接领取" style=" background: #fff; width: 100%;height: 0.8rem;line-height: 0.8rem;margin-bottom:2px;border: 0px; text-align: right;" />
				  </#if>
				  <#if receiving.type?if_exists&&receiving.type=='2'>
					  <input type="text" name="name" value="转让" style=" background: #fff; width: 100%;height: 0.8rem;line-height: 0.8rem;margin-bottom:2px;border: 0px; text-align: right;" />
				  </#if>
              </span></p>
             </div>
             <div class="pay_02 lingqu" <#if receiving.type?if_exists&&receiving.type=='2'> style="display:none;"</#if>>


			<#if receiving.type?if_exists&&item.type=='1'>

				<p class="border_bottom"> 收货人
			  	<span>
				  <input type="text" name="name" value="${receiving.name}" style=" background: #fff; width: 100%;height: 0.8rem;line-height: 0.8rem;margin-bottom:2px;border: 0px; text-align: right;" placeholder="请输入收货人" />
				  <input type="hidden" id="memberId" value="${receiving.memberId}" />
				  <input type="hidden" id="activityId" value="${receiving.activityId}" />
			  	</span>
				</p>
				<p class="border_bottom">收货人手机号
				  <span>
					  <input type="text" name="phone" value="${receiving.phone}" style="background: #fff;width: 100%;height: 0.8rem;line-height: 0.8rem;margin-bottom:2px;border: 0px; text-align: right;" placeholder="请输入手机号"/>
				  </span>
				</p>
				<p class="border_bottom">收货地址
				  <span>
					  <input type="text" name="address" value="${receiving.address}"
							 style="background: #fff;width: 100%;height: 0.8rem;line-height: 0.8rem;margin-bottom:2px;border: 0px; text-align: right;" placeholder="请输入收货地址" />
				  </span>
				</p>
			</#if>


			<#if receiving.type?if_exists&&item.type=='2'>
				<p class="border_bottom">兑换码
						  <span>
							  <input type="text" name="address" value="${receiving.redeemCode}"
									 style="background: #fff;width: 100%;height: 0.8rem;line-height: 0.8rem;margin-bottom:2px;border: 0px; text-align: right;" />
						  </span>
				</p>
			</#if>



             </div>

             <div class="pay_02 zhuanrang" <#if receiving.type?if_exists&&receiving.type=='1'> style="display:none;"</#if>>
              <p class="border_bottom"> 转让人ID
				  <span>
					  <input type="text" id="otherUser" value="${receiving.otherUser}" style="background: #fff;width: 100%;height: 0.8rem;line-height: 0.8rem;margin-bottom:2px;border: 0px; text-align: right;" placeholder="请输入转让人ID" />
				  </span>
			  </p>
				<p class="border_bottom"> 转让钻石
					<span>
						  <input type="text" value="${receiving.transferPrice}" style="background: #fff;width: 100%;height: 0.8rem;line-height: 0.8rem;margin-bottom:2px;border: 0px; text-align: right;" placeholder="请输入转让钻石" />
				     </span>
				</p>

				<p class="border_bottom"> 是否成功
					<span>
						  <input type="text" value="<#if receiving.status?if_exists&&receiving.status=='1'>否<#else>是</#if>" style="background: #fff;width: 100%;height: 0.8rem;line-height: 0.8rem;margin-bottom:2px;border: 0px; text-align: right;" placeholder="" />
					 </span>
				</p>

				<p class="border_bottom"> 描述
					<span>
						  <input type="text" value="${receiving.receivingDesc}" style="background: #fff;width: 100%;height: 0.8rem;line-height: 0.8rem;margin-bottom:2px;border: 0px; text-align: right;" placeholder="" />
					 </span>
				</p>
             </div>
			<div id="duihuanShow" style="display: none;">
				<div class="but_content">
					<input type="text" id="receivingDesc" />
				</div>
			</div>

		<div class="pay_04 margin_top_1 " <#if receiving.type?if_exists&&receiving.type=='2'&&receiving.status=='2'> style=""<#else>style="display:none;"</#if>>
			<#if complainStatus?if_exists&&complainStatus=='1'>
				<a class="ui-btn" >申诉中</a>
			</#if>
			<#if complainStatus?if_exists&&complainStatus=='2'>
				<a class="ui-btn" id="complain">申诉</a>
			</#if>
		</div>

      	</div>	
           
          <script src="${s.base}/mobile/js/jquery-1.7.2.min.js"></script>
		  <script type="text/javascript" src="${s.base}/mobile/js/common.js"></script>
		  <script type="text/javascript" src="${s.base}/js/layer/layer.js"></script>
		  <script type="text/javascript" src="${s.base}/js/base/commont.js"></script>
          <script type="text/javascript">
          	$("#type").bind("change",function(){
				var type=$("#type").val();
				var id = '${address.id}';
				if(type=='1'){
					//直接领取
					$(".zhuanrang").hide();
					$(".lingqu").show();
					if (id != ""){
						$("#addressShow").hide();
					} else {
						$("#addressShow").show();
					}
				}else{
					$(".lingqu").hide();
					$(".zhuanrang").show();
					$("#addressShow").hide();
				}
			});

			// 申诉
			$("#complain").bind("click",function(){
                layer.open({
                    type: 1,
                    title: '申诉内容',
                    shadeClose: true,
                    shade: 0.8,
                    btn: ['保存', '取消'],
                    area: ['40%', '70%'],
                    content: $('#duihuanShow'),
                    yes:function(index, layero){
                        //layer.close(index);
                        var receivingDesc = $("#receivingDesc").val();
                        if(receivingDesc == null || receivingDesc == ""){
                            layer.alert("您必须输入申诉内容");
                            return false;
                        }
                        $.post("/receiving/updateComplain",{
                            memberId : $("#memberId").val(),
                            activityId : $("#activityId").val(),
                            otherUser : $("#otherUser").val(),
                            description : receivingDesc
                        },function(result){
                            if (result.returnInfo.state == '1'){
                                showLayerAlertNoRefre("申诉成功！");
                            } else {
                                showLayerAlertNoRefre(result.returnInfo.errorMsg);
                            }
                        },"json");
                    },cancel: function(){}
                });
			});
          </script>
	</body>

</html>